﻿using System;
using System.Web.UI.WebControls;
using BLL.RF.ATETest;

public partial class ViewbyProduct_ViewUploadZTEData_ZTEDataViewbySN : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //正常换行
        //GridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
        //自动换行
        GridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        BindTests();
    }

    private void BindTests()
    {
        string ProductSN = this.TextBox3.Text.Trim();
        ProductSN = CommHelper.GetProductSN(ProductSN);

        tb_result_DFL test = new tb_result_DFL();
        GridView1.DataSource = test.tb_result_DFL_GetbySN_withoutFilter(ProductSN);
        GridView1.DataBind();
        //for (int i = 0; i < GridView1.Rows.Count; i++)
        //{
        //    if (GridView1.Rows[i].Cells[6].Text == "失败")
        //        GridView1.Rows[i].Cells[6].ForeColor = System.Drawing.Color.Red;
        //}
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView1.PageIndex = e.NewPageIndex;
        BindTests();
    }
}
